package com.woniuxy.dao;


import com.woniuxy.entity.Merchants;
import com.woniuxy.entity.OrderDetail;
import com.woniuxy.entity.OrderEntity;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface OrderDao {
    //查找所有的订单信息
    List<OrderEntity> findAllOrder();
    //分页
    List<OrderEntity> findAllByPage();
    //根据订单号查找订单信息
    List<OrderEntity> findAllOrderByNum(String order_num);
    //添加订单信息
    int addOneOrder(OrderEntity orderEntity);
    //修改订单信息
    int updateOrder(OrderEntity orderEntity);
    //删除订单信息
    int deleteOrder(String order_num);
    //下发订单信息
    int positionOrder(String order_num);
    //撤回订单信息
    int handleExit(String order_num);
    //终止订单信息
    int termination(String order_num);
    //查找该订单号下所有的产品信息
    List<OrderDetail> findDetailOrders(String order_num);
    //产品编码
    List<OrderEntity> materialCodeData();
    //产品名称和产品类型
    List<OrderDetail> productionNameAndType(String material_code);
    //产品单价
    BigDecimal productionPrice(String material_code);
    //插入总金额
    int addTotalMoney(String order_num, BigDecimal total_money);
    //查询客商姓名
    List<Merchants> findMerchantsName();
    //查找客商优先级
    String getmerchants_grade(String name);
}

